package com.zyx.mpdemo.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author Yaxi.Zhang
 * @since 2022/3/28 10:03
 */
@Data
@Accessors(chain = true)
@TableName("t_user")
public class User {

    // 将属性所对应的字段指定为主键
    //      @TableId注解的value属性用于指定主键的字段
    //      @TableId注解的type属性设置主键生成策略
    //      @TableId(value = "uid", type = IdType.AUTO)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    // 指定属性所对应的字段名
    @TableField("user_name")
    private String name;

    private Integer age;

    private String email;

    // private SexEnum sex;

    // @TableLogic
    // private Integer isDeleted;
}
